package com.bbzn.device.client.service.impl;

import com.bbzn.device.client.dao.group.GroupDeviceMapper;
import com.bbzn.device.client.dataobject.GroupDevice;
import com.bbzn.device.client.dto.ct.data.ProductUnionDTO;
import com.bbzn.device.client.dto.group.GroupDeviceDTO;
import com.bbzn.device.client.dto.group.InGroupDTO;
import com.bbzn.device.client.dto.group.OutGroupDTO;
import com.bbzn.device.client.service.GroupDeviceService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class GroupDeviceServiceImpl implements GroupDeviceService {

    @Resource
    private GroupDeviceMapper groupDeviceMapper;

    @Override
    public int deleteByPrimaryKey(Long id) {
        return groupDeviceMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(GroupDevice record) {
        return groupDeviceMapper.insert(record);
    }

    @Override
    public int insertOrUpdate(GroupDevice record) {
        return groupDeviceMapper.insertOrUpdate(record);
    }

    @Override
    public int insertOrUpdateSelective(GroupDevice record) {
        return groupDeviceMapper.insertOrUpdateSelective(record);
    }

    @Override
    public int insertSelective(GroupDevice record) {
        return groupDeviceMapper.insertSelective(record);
    }

    @Override
    public GroupDevice selectByPrimaryKey(Long id) {
        return groupDeviceMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(GroupDevice record) {
        return groupDeviceMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(GroupDevice record) {
        return groupDeviceMapper.updateByPrimaryKey(record);
    }

    @Override
    public List<GroupDevice> findByAll(GroupDevice groupDevice) {
        return groupDeviceMapper.findByAll(groupDevice);
    }

    @Override
    public int updateBatch(List<GroupDevice> list) {
        return groupDeviceMapper.updateBatch(list);
    }

    @Override
    public int updateBatchSelective(List<GroupDevice> list) {
        return groupDeviceMapper.updateBatchSelective(list);
    }

    @Override
    public int batchInsert(List<GroupDevice> list) {
        return groupDeviceMapper.batchInsert(list);
    }

    @Override
    public List<GroupDevice> queryByAll(GroupDeviceDTO group) {
        return groupDeviceMapper.queryByAll(group);
    }

    @Override
    public int batchDel(List<Long> list) {
        return groupDeviceMapper.batchDel(list);
    }

    @Override
    public List<InGroupDTO> getInGroupDevice(List<Long> ids, Long groupId) {
        return groupDeviceMapper.getInGroupDevice(ids, groupId);
    }

    @Override
    public List<String> getInGroupDeviceByImeis(List<String> imeis, Long groupId) {
        return groupDeviceMapper.getInGroupDeviceByImeis(imeis,groupId);
    }

    @Override
    public String getTopic(Long groupId) {
        return groupDeviceMapper.getTopic(groupId);
    }

    @Override
    public List<OutGroupDTO> getOutGroupDevice(List<Long> ids) {
        return groupDeviceMapper.getOutGroupDevice(ids);
    }

    @Override
    public ProductUnionDTO getDeviceDetailByImei(String imei) {
        return groupDeviceMapper.getDeviceDetailByImei(imei);
    }

    @Override
    public List<ProductUnionDTO> getInGroupDeviceExceptSelf(String imei, Long groupId) {
        return groupDeviceMapper.getInGroupDeviceExceptSelf(imei,groupId);
    }

    @Override
    public List<String> getGroupDeviceList(List<String> parameter) {
        return groupDeviceMapper.getGroupDeviceList(parameter);
    }

    @Override
    public List<String> getNbDeviceList(List<String> parameter) {
        return groupDeviceMapper.getNbDeviceList(parameter);
    }

    @Override
    public List<ProductUnionDTO> getProductUnionDTOList(List<String> list) {
        return groupDeviceMapper.getProductUnionDTOList(list);
    }

    @Override
    public int deleteByImei(String imei) {
        return groupDeviceMapper.deleteByImei(imei);
    }

    @Override
    public int batchDelete(List<Long> ids) {
        return groupDeviceMapper.batchDelete(ids);
    }
}



